﻿using Bandit;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ETC.DLEDPositionTool.Models
{
    public class MyROIRect : Bandit.UI.MVVM.NotifyObject
    {

        private string _Text;
        public string Text
        {
            get { return _Text; }
            set
            {
                _Text = value;
                OnPropertyChanged("Text");
            }
        }

        private string _Name;

        public string Name
        {
            get { return _Name; }
            set
            {
                _Name = value;
                OnPropertyChanged("Name");
            }
        }

        private bool _IsEnable = true;
        public bool IsEnable
        {
            get { return _IsEnable; }
            set
            {
                _IsEnable = value;
                if (_IsEnable)
                {
                    this.Background = "DarkGreen";
                }
                else
                {
                    this.Background = "DarkRed";
                }
                OnPropertyChanged("IsEnable");
            }
        }

        /// <summary>
        /// 背景色
        /// </summary>
        private string _Background = "DarkGreen";
        public string Background
        {
            get { return _Background; }
            set
            {
                _Background = value;
                OnPropertyChanged("Background");
            }
        }

        private int _X;

        public int X
        {
            get { return _X; }
            set
            {
                _X = value;
                OnPropertyChanged("X");
            }
        }

        private int _Y;
        public int Y
        {
            get { return _Y; }
            set
            {
                _Y = value;
                OnPropertyChanged("Y");
            }
        }

        private int _Width;
        public int Width
        {
            get { return _Width; }
            set
            {
                _Width = value;
                OnPropertyChanged("Width");
            }
        }
        private int _Height;

        public int Height
        {
            get { return _Height; }
            set
            {
                _Height = value;
                OnPropertyChanged("Height");
            }
        }

        private string _LED = "0_0";
        public string LED
        {
            get { return _LED; }
            set
            {
                _LED = value;
                OnPropertyChanged("LED");
            }
        }

        private List<LEDPoint> _lEDPoints = new List<LEDPoint>();
        public List<LEDPoint> LEDPoints
        {
            get { return _lEDPoints; }
            set
            {
                _lEDPoints = value;
                OnPropertyChanged(nameof(LEDPoints));
            }
        }

    }
}
